package utils;

import android.content.Context;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

import com.ui.R;

public class AnimationFactory {

	@SuppressWarnings("static-access")
	public static Animation selectanimation(Context cont, int index) {
	    switch(index){
		    /*
		     * create animations, and return them to caller. 
		     */
		    case 0: return new AnimationUtils().loadAnimation(cont, R.anim.animator_set);
		    case 1: return new AnimationUtils().loadAnimation(cont, R.anim.animator);
		    case 2: return new AnimationUtils().loadAnimation(cont, R.anim.color_animator);
		    case 3: return new AnimationUtils().loadAnimation(cont, R.anim.cycle_7);
		    case 4: return new AnimationUtils().loadAnimation(cont, R.anim.fadein);
		    case 5: return new AnimationUtils().loadAnimation(cont, R.anim.fadeout);
		    case 6: return new AnimationUtils().loadAnimation(cont, R.anim.hold);
		    case 7: return new AnimationUtils().loadAnimation(cont, R.anim.hyperspace_in);
		    case 8: return new AnimationUtils().loadAnimation(cont, R.anim.hyperspace_out);
		    case 9: return new AnimationUtils().loadAnimation(cont, R.anim.layout_animation_row_left_slide);
		    case 10: return new AnimationUtils().loadAnimation(cont, R.anim.layout_animation_row_right_slide);
		    case 11: return new AnimationUtils().loadAnimation(cont, R.anim.layout_animation_table);
		    case 12: return new AnimationUtils().loadAnimation(cont, R.anim.layout_bottom_to_top_slide);
		    case 13: return new AnimationUtils().loadAnimation(cont, R.anim.layout_grid_fade);
		    case 14: return new AnimationUtils().loadAnimation(cont, R.anim.layout_grid_inverse_fade);
		    case 15: return new AnimationUtils().loadAnimation(cont, R.anim.layout_random_fade);
		    case 16: return new AnimationUtils().loadAnimation(cont, R.anim.layout_wave_scale);
		    case 17: return new AnimationUtils().loadAnimation(cont, R.anim.object_animator);
		    case 18: return new AnimationUtils().loadAnimation(cont, R.anim.push_left_in);
		    case 19: return new AnimationUtils().loadAnimation(cont, R.anim.push_left_out);
		    case 20: return new AnimationUtils().loadAnimation(cont, R.anim.push_up_in);
		    case 21: return new AnimationUtils().loadAnimation(cont, R.anim.push_up_out);
		    case 22: return new AnimationUtils().loadAnimation(cont, R.anim.shake);
		    case 23: return new AnimationUtils().loadAnimation(cont, R.anim.slide_left);
		    case 24: return new AnimationUtils().loadAnimation(cont, R.anim.slide_right);
		    case 25: return new AnimationUtils().loadAnimation(cont, R.anim.slide_top_to_bottom);
		    case 26: return new AnimationUtils().loadAnimation(cont, R.anim.wave_scale);
		    case 27: return new AnimationUtils().loadAnimation(cont, R.anim.zoom_enter);
		    case 28: return new AnimationUtils().loadAnimation(cont, R.anim.zoom_exit);
	    }
	    return null;
	 }
}
